#include <tinx/stdio.h>
#include <tinx/sys/stat.h>

int main() {
    struct stat st;
    int ret = lstat("/bin/", &st);  // 末尾带斜杠
    printf("ret = %d\n", ret);
    if (ret < 0) {
        perror("lstat failed");
        // 输出: "lstat failed: Not a directory"
    } else {
        printf("s: inode=%lu\n", st.st_ino);
    }
    return 0;
}
